package com.hzncc.flowable_diboot.project_contracts.vo;

import com.diboot.core.binding.annotation.BindDict;
import com.diboot.core.binding.annotation.BindEntityList;
import com.diboot.core.binding.annotation.BindField;
import com.diboot.core.vo.FileVO;
import com.diboot.core.vo.LabelValue;
import com.diboot.file.entity.FileRecord;
import com.diboot.iam.entity.IamUser;
import com.hzncc.flowable_diboot.contract.entity.SalesContract;
import com.hzncc.flowable_diboot.project_contracts.entity.SalesContractPaymentCollection;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.List;
/**
* 销售合同收汇 VO定义
* @author MyName
* @version 1.0
* @date 2024-09-27
* Copyright © MyCorp
*/
@Getter @Setter @Accessors(chain = true)
public class SalesContractPaymentCollectionListVO extends SalesContractPaymentCollection  {
private static final long serialVersionUID = 1603010505757188622L;
    /**
    * 销售合同id 关联信息
    */

    @BindField(
        entity = SalesContract.class,
        field = "sapCode",
        condition = "this.sales_contract_id = id"
     )
    private String salesContractIdLabel;

    /**
    * 收汇附件 关联文件信息
    */
    @BindEntityList(entity = FileRecord.class, condition = "this.attach = id", splitBy = ",")
    private List<FileVO> attachFiles;

    /**
    * 币种 关联字典选项
    */
    @BindDict(
    type = "currency",
    field = "currency"
    )
    private LabelValue currencyLabel;

    /**
    * 创建人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.create_by = id"
     )
    private String createByLabel;

    /**
    * 更新人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.update_by = id"
     )
    private String updateByLabel;

}